import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common';

@Injectable()
export class CreateTeacherDtoPipe implements PipeTransform {
  transform(value: any, metadata: ArgumentMetadata) {
    if (!('roleIds' in value)) {
      value.roleIds = [2];
    }
    return value;
  }
}
